<?php

class Default_CircuitController extends Zend_Controller_Action
{

    public function init()
    {
        /* Initialize action controller here */
    }

    public function indexAction()
    {
    	$circuitDAO = new Application_Model_CircuitDAO();
        $this->view->circuits = $circuitDAO->findAll();
    }
	
    public function showAction()
    {
    	$id = $this->getRequest()->getParam('id');
    	$circuitDAO = new Application_Model_CircuitDAO();
    	$this->view->id =$id;
    	$this->view->circuits = $circuitDAO->findAll();
    	$this->view->circuit = $circuitDAO->find((int)$id);
    }
}

